package com.lmuse.xmr.foodspotting.ui.welcome;

import android.content.Intent;
import android.os.Bundle;

import com.lmuse.xmr.foodspotting.BaseActivity;
import com.lmuse.xmr.foodspotting.R;
import com.lmuse.xmr.foodspotting.ui.main.MainActivity;

public class WelcomeActivity extends BaseActivity implements Contract.WelcomeView{

    private Contract.WelcomePresenter presenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        presenter = new WelcomePresenterImpl(this);
    }

    @Override
    public void onFinish() {
        Intent intent = new Intent(this, MainActivity.class);
        startActivity(intent);
        this.finish();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        presenter.onDetach();
    }
}